/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package app;

import gui.FrameANN;
import java.util.ArrayList;
import java.util.Vector;
import javax.swing.*;
import libs.Utils;
import types.TDataSet;
import types.TMLPNode;

/**
 *
 * @author musa-atas
 */
public class AppMainFrame extends javax.swing.JFrame {

    public TDataSet ds = null;
    private TDataSet ds_test = null;
    private String version = "Siirt Vision & Cybernetics Labs Version : 21.07.2012";
    private Vector<String> orgData = new Vector<String>();
    private Vector<String> vAllDS = new Vector<String>();
    private Vector<String> vAllTrain = new Vector<String>();
    private Vector<String> vTrain = new Vector<String>();
    private Vector<String> vValidation = new Vector<String>();
    private Vector<String> vTest = new Vector<String>();
    private Vector<String> orgTrain = new Vector<String>();
    private Vector<String> orgValidation = new Vector<String>();
    private Vector<String> orgTest = new Vector<String>();
    public Vector<String> normalizedTrain = new Vector<String>();
    public Vector<String> normalizedValidation = new Vector<String>();
    public Vector<String> normalizedTest = new Vector<String>();
    public String currentFile = "";
    public int nRpt = 1;  //number of repeating sample, forexample in pepper its 3, or segmented pepper its 27
    public int nClasses = 1;  //number of classes in binary format. Burada class labeller arasinda max degere sahip class binary formatta max. kaç digit oldugu hesaplanir bu deger nClass olarak belirlenir.
    private boolean isDataNormalized = false;
    private String FeatureLabelString = "";
    public int nFeatures = 0;
    private FrameANN modelANN = null;

    /**
     * Creates new form AppMainFrame
     */
    public AppMainFrame() {
        initComponents();
        this.setTitle(version);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        tab_main = new javax.swing.JTabbedPane();
        pan_dataSet = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        btn_loadDS = new javax.swing.JButton();
        btn_saveDS = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        text_separatorChar = new javax.swing.JTextField();
        btn_generateDS = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        text_numberOfArtificialFeatures = new javax.swing.JTextField();
        text_numberOfArtificialRows = new javax.swing.JTextField();
        combo_randomizationTechnque = new javax.swing.JComboBox();
        jLabel32 = new javax.swing.JLabel();
        btn_plotDS = new javax.swing.JButton();
        pan_preProcessing = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        btn_normalizeDataSet = new javax.swing.JButton();
        combo_normalizationTechnique = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        btn_kFoldCV = new javax.swing.JButton();
        chk_kFoldFromFile = new javax.swing.JCheckBox();
        jLabel92 = new javax.swing.JLabel();
        txt_kFold = new javax.swing.JTextField();
        btn_generateKFoldTemplate = new javax.swing.JButton();
        pan_modelSelection = new javax.swing.JPanel();
        btn_ann = new javax.swing.JButton();
        btn_lda = new javax.swing.JButton();
        btn_svm = new javax.swing.JButton();
        chk_useLDA = new javax.swing.JCheckBox();
        chk_useANN = new javax.swing.JCheckBox();
        chk_useSVM = new javax.swing.JCheckBox();
        pan_featureSelection = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        combo_featureSelectionMethod = new javax.swing.JComboBox();
        radio_unTyped = new javax.swing.JRadioButton();
        radio_filter = new javax.swing.JRadioButton();
        radio_wrapper = new javax.swing.JRadioButton();
        pan_evaluation = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        combo_CV = new javax.swing.JComboBox();
        btn_evaluateML = new javax.swing.JButton();
        pan_visualization = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        log = new javax.swing.JTextArea();
        tab_dsTables = new javax.swing.JTabbedPane();
        pan_trainDS = new javax.swing.JPanel();
        lbl_trainRow = new javax.swing.JLabel();
        lbl_trainColumn = new javax.swing.JLabel();
        jScrollPane9 = new javax.swing.JScrollPane();
        table_trainDS = new javax.swing.JTable();
        pan_validationDS = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        table_validationDS = new javax.swing.JTable();
        lbl_validationRow = new javax.swing.JLabel();
        lbl_validationColumn = new javax.swing.JLabel();
        pan_testDS = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        table_testDS = new javax.swing.JTable();
        lbl_testRow = new javax.swing.JLabel();
        lbl_testColumn = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        text_rankedFeatures = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        text_rankedFeatureLabels = new javax.swing.JTextField();
        jLabel191 = new javax.swing.JLabel();
        text_rankedFeatureWeights = new javax.swing.JTextField();
        jComboBox_driver = new javax.swing.JComboBox();
        jLabel72 = new javax.swing.JLabel();
        chk_kFoldDS = new javax.swing.JCheckBox();
        btn_reloadDS = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Siirt Cybernetics & Vision Labs   Ver:04.07.2012");

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btn_loadDS.setBackground(new java.awt.Color(153, 255, 204));
        btn_loadDS.setText("Load DataSet");
        btn_loadDS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_loadDSActionPerformed(evt);
            }
        });

        btn_saveDS.setBackground(new java.awt.Color(255, 153, 153));
        btn_saveDS.setText("Save DataSet");
        btn_saveDS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_saveDSActionPerformed(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel1.setText("Separator character:");

        text_separatorChar.setText(";");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(text_separatorChar, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(text_separatorChar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        btn_generateDS.setBackground(new java.awt.Color(102, 102, 255));
        btn_generateDS.setText("Generate Synthetic DataSet");
        btn_generateDS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_generateDSActionPerformed(evt);
            }
        });

        jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel2.setText("number of features:");

        jLabel3.setText("number of samples:");

        text_numberOfArtificialFeatures.setText("11");

        text_numberOfArtificialRows.setText("100");

        combo_randomizationTechnque.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Uniform Distribution", "Gaussian Distribution" }));

        jLabel32.setText("randomization technique:");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(text_numberOfArtificialRows, javax.swing.GroupLayout.DEFAULT_SIZE, 47, Short.MAX_VALUE)
                    .addComponent(text_numberOfArtificialFeatures))
                .addGap(26, 26, 26)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(combo_randomizationTechnque, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(text_numberOfArtificialFeatures, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel32))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(text_numberOfArtificialRows, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(combo_randomizationTechnque, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        btn_plotDS.setBackground(new java.awt.Color(255, 255, 51));
        btn_plotDS.setText("Plot DataSet");
        btn_plotDS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_plotDSActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(btn_loadDS, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btn_generateDS)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 311, Short.MAX_VALUE)
                .addComponent(btn_plotDS, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btn_saveDS, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(btn_loadDS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btn_generateDS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btn_saveDS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
            .addComponent(btn_plotDS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout pan_dataSetLayout = new javax.swing.GroupLayout(pan_dataSet);
        pan_dataSet.setLayout(pan_dataSetLayout);
        pan_dataSetLayout.setHorizontalGroup(
            pan_dataSetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_dataSetLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pan_dataSetLayout.setVerticalGroup(
            pan_dataSetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_dataSetLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tab_main.addTab("DataSet Manager", pan_dataSet);

        jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btn_normalizeDataSet.setBackground(new java.awt.Color(153, 255, 204));
        btn_normalizeDataSet.setText("Normalize DataSet");
        btn_normalizeDataSet.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_normalizeDataSetActionPerformed(evt);
            }
        });

        combo_normalizationTechnique.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "zscore", "minmax", "unitvector", "tanh", "sigmoidal" }));

        jLabel4.setText("Normalization Technique");

        btn_kFoldCV.setBackground(new java.awt.Color(255, 255, 51));
        btn_kFoldCV.setText("K-Fold Cross Validation");
        btn_kFoldCV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_kFoldCVActionPerformed(evt);
            }
        });

        chk_kFoldFromFile.setText("From File");
        chk_kFoldFromFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chk_kFoldFromFileActionPerformed(evt);
            }
        });

        jLabel92.setText("Number of Folds:");

        txt_kFold.setText("5");

        btn_generateKFoldTemplate.setBackground(new java.awt.Color(255, 102, 204));
        btn_generateKFoldTemplate.setText("repair test files");
        btn_generateKFoldTemplate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_generateKFoldTemplateActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(combo_normalizationTechnique, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btn_normalizeDataSet, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btn_kFoldCV, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel92)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txt_kFold, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(chk_kFoldFromFile, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btn_generateKFoldTemplate, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(493, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(2, 2, 2)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btn_normalizeDataSet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                        .addGap(0, 1, Short.MAX_VALUE)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(chk_kFoldFromFile)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel92)
                                    .addComponent(txt_kFold, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(btn_generateKFoldTemplate, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                            .addComponent(btn_kFoldCV, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addGap(14, 14, 14)
                                .addComponent(combo_normalizationTechnique, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap())
        );

        javax.swing.GroupLayout pan_preProcessingLayout = new javax.swing.GroupLayout(pan_preProcessing);
        pan_preProcessing.setLayout(pan_preProcessingLayout);
        pan_preProcessingLayout.setHorizontalGroup(
            pan_preProcessingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_preProcessingLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pan_preProcessingLayout.setVerticalGroup(
            pan_preProcessingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_preProcessingLayout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 3, Short.MAX_VALUE))
        );

        tab_main.addTab("Preprocessing Manager", pan_preProcessing);

        btn_ann.setBackground(new java.awt.Color(153, 255, 204));
        btn_ann.setText("Artificial Neural Network");
        btn_ann.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_annActionPerformed(evt);
            }
        });

        btn_lda.setBackground(new java.awt.Color(153, 255, 204));
        btn_lda.setText("Linear Discriminant Analysis");
        btn_lda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_ldaActionPerformed(evt);
            }
        });

        btn_svm.setBackground(new java.awt.Color(153, 255, 204));
        btn_svm.setText("Support Vector Machine");
        btn_svm.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_svmActionPerformed(evt);
            }
        });

        chk_useLDA.setText("Use LDA");
        chk_useLDA.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                chk_useLDAİtemStateChanged(evt);
            }
        });

        chk_useANN.setSelected(true);
        chk_useANN.setText("Use ANN");
        chk_useANN.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                chk_useANNİtemStateChanged(evt);
            }
        });

        chk_useSVM.setText("Use SVM");
        chk_useSVM.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                chk_useSVMİtemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout pan_modelSelectionLayout = new javax.swing.GroupLayout(pan_modelSelection);
        pan_modelSelection.setLayout(pan_modelSelectionLayout);
        pan_modelSelectionLayout.setHorizontalGroup(
            pan_modelSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_modelSelectionLayout.createSequentialGroup()
                .addGroup(pan_modelSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pan_modelSelectionLayout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(btn_ann, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pan_modelSelectionLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(chk_useANN)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pan_modelSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btn_lda, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(chk_useLDA))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pan_modelSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chk_useSVM)
                    .addComponent(btn_svm, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(768, Short.MAX_VALUE))
        );
        pan_modelSelectionLayout.setVerticalGroup(
            pan_modelSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_modelSelectionLayout.createSequentialGroup()
                .addGroup(pan_modelSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chk_useLDA)
                    .addComponent(chk_useANN)
                    .addComponent(chk_useSVM))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pan_modelSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btn_ann, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                    .addComponent(btn_lda, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btn_svm, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        tab_main.addTab("Model Selection Manager", pan_modelSelection);

        jLabel6.setText("Feature Selection Type :");

        jLabel7.setText("Feature Selection Method:");

        combo_featureSelectionMethod.setEnabled(false);

        buttonGroup1.add(radio_unTyped);
        radio_unTyped.setSelected(true);
        radio_unTyped.setText("No Feature Selection");
        radio_unTyped.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                radio_unTypedİtemStateChanged(evt);
            }
        });

        buttonGroup1.add(radio_filter);
        radio_filter.setText("Filter");
        radio_filter.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                radio_filterİtemStateChanged(evt);
            }
        });

        buttonGroup1.add(radio_wrapper);
        radio_wrapper.setText("Wrapper");
        radio_wrapper.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                radio_wrapperİtemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout pan_featureSelectionLayout = new javax.swing.GroupLayout(pan_featureSelection);
        pan_featureSelection.setLayout(pan_featureSelectionLayout);
        pan_featureSelectionLayout.setHorizontalGroup(
            pan_featureSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_featureSelectionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pan_featureSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pan_featureSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(combo_featureSelectionMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pan_featureSelectionLayout.createSequentialGroup()
                        .addComponent(radio_unTyped)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(radio_filter)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(radio_wrapper)))
                .addContainerGap(902, Short.MAX_VALUE))
        );
        pan_featureSelectionLayout.setVerticalGroup(
            pan_featureSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_featureSelectionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pan_featureSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(radio_unTyped)
                    .addComponent(radio_filter)
                    .addComponent(radio_wrapper))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pan_featureSelectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(combo_featureSelectionMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        tab_main.addTab("Feature Selection Manager", pan_featureSelection);

        jLabel8.setText("Cross Validation (Train+Validation Set):");

        combo_CV.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Leave One Out CV", "Random 5 Fold CV", "Random 10 Fold CV" }));

        btn_evaluateML.setBackground(new java.awt.Color(255, 102, 102));
        btn_evaluateML.setText("Evaluate Machine Learning Model");
        btn_evaluateML.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_evaluateMLActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pan_evaluationLayout = new javax.swing.GroupLayout(pan_evaluation);
        pan_evaluation.setLayout(pan_evaluationLayout);
        pan_evaluationLayout.setHorizontalGroup(
            pan_evaluationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_evaluationLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pan_evaluationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(combo_CV, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btn_evaluateML, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(877, Short.MAX_VALUE))
        );
        pan_evaluationLayout.setVerticalGroup(
            pan_evaluationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_evaluationLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pan_evaluationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pan_evaluationLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(btn_evaluateML, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pan_evaluationLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(combo_CV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 16, Short.MAX_VALUE)))
                .addContainerGap())
        );

        tab_main.addTab("Evaluation Manager", pan_evaluation);

        javax.swing.GroupLayout pan_visualizationLayout = new javax.swing.GroupLayout(pan_visualization);
        pan_visualization.setLayout(pan_visualizationLayout);
        pan_visualizationLayout.setHorizontalGroup(
            pan_visualizationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1294, Short.MAX_VALUE)
        );
        pan_visualizationLayout.setVerticalGroup(
            pan_visualizationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 78, Short.MAX_VALUE)
        );

        tab_main.addTab("Visualization Manager", pan_visualization);

        log.setColumns(20);
        log.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        log.setRows(5);
        jScrollPane1.setViewportView(log);

        lbl_trainRow.setText("Row:");

        lbl_trainColumn.setText("Column:");

        table_trainDS.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        table_trainDS.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        table_trainDS.setCellSelectionEnabled(true);
        jScrollPane9.setViewportView(table_trainDS);
        table_trainDS.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        javax.swing.GroupLayout pan_trainDSLayout = new javax.swing.GroupLayout(pan_trainDS);
        pan_trainDS.setLayout(pan_trainDSLayout);
        pan_trainDSLayout.setHorizontalGroup(
            pan_trainDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_trainDSLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbl_trainRow, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(30, 30, 30)
                .addComponent(lbl_trainColumn, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(1091, Short.MAX_VALUE))
            .addGroup(pan_trainDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(pan_trainDSLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 1274, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        pan_trainDSLayout.setVerticalGroup(
            pan_trainDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_trainDSLayout.createSequentialGroup()
                .addGroup(pan_trainDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbl_trainRow)
                    .addComponent(lbl_trainColumn))
                .addGap(0, 391, Short.MAX_VALUE))
            .addGroup(pan_trainDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pan_trainDSLayout.createSequentialGroup()
                    .addGap(20, 20, 20)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
                    .addContainerGap()))
        );

        tab_dsTables.addTab("Train DS", pan_trainDS);

        table_validationDS.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        table_validationDS.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        table_validationDS.setCellSelectionEnabled(true);
        jScrollPane7.setViewportView(table_validationDS);
        table_validationDS.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        lbl_validationRow.setText("Row:");

        lbl_validationColumn.setText("Column:");

        javax.swing.GroupLayout pan_validationDSLayout = new javax.swing.GroupLayout(pan_validationDS);
        pan_validationDS.setLayout(pan_validationDSLayout);
        pan_validationDSLayout.setHorizontalGroup(
            pan_validationDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_validationDSLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pan_validationDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 1274, Short.MAX_VALUE)
                    .addGroup(pan_validationDSLayout.createSequentialGroup()
                        .addComponent(lbl_validationRow, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(33, 33, 33)
                        .addComponent(lbl_validationColumn, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pan_validationDSLayout.setVerticalGroup(
            pan_validationDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pan_validationDSLayout.createSequentialGroup()
                .addGroup(pan_validationDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbl_validationRow)
                    .addComponent(lbl_validationColumn))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
                .addContainerGap())
        );

        tab_dsTables.addTab("Validation DS", pan_validationDS);

        table_testDS.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        table_testDS.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        table_testDS.setCellSelectionEnabled(true);
        jScrollPane8.setViewportView(table_testDS);
        table_testDS.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        lbl_testRow.setText("Row:");

        lbl_testColumn.setText("Column:");

        javax.swing.GroupLayout pan_testDSLayout = new javax.swing.GroupLayout(pan_testDS);
        pan_testDS.setLayout(pan_testDSLayout);
        pan_testDSLayout.setHorizontalGroup(
            pan_testDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pan_testDSLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pan_testDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 1274, Short.MAX_VALUE)
                    .addGroup(pan_testDSLayout.createSequentialGroup()
                        .addComponent(lbl_testRow, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(26, 26, 26)
                        .addComponent(lbl_testColumn, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pan_testDSLayout.setVerticalGroup(
            pan_testDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pan_testDSLayout.createSequentialGroup()
                .addGroup(pan_testDSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbl_testRow)
                    .addComponent(lbl_testColumn))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
                .addContainerGap())
        );

        tab_dsTables.addTab("Test DS", pan_testDS);

        jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel5.setText("Ranked Features:");

        text_rankedFeatures.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                text_rankedFeaturesKeyTyped(evt);
            }
        });

        jLabel19.setText("Class Labels:");

        jLabel191.setText("Feature Weights:");

        jComboBox_driver.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "E:", "C:", "D:", "G:" }));

        jLabel72.setText("Folder:");

        chk_kFoldDS.setText("K-FOLD DataSet (Train+Test)");

        btn_reloadDS.setBackground(new java.awt.Color(51, 51, 255));
        btn_reloadDS.setText("Reload DataSet");
        btn_reloadDS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_reloadDSActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel191, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(text_rankedFeatureWeights)
                            .addComponent(text_rankedFeatureLabels)
                            .addComponent(text_rankedFeatures)))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGap(60, 60, 60)
                        .addComponent(jLabel72)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBox_driver, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(chk_kFoldDS)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btn_reloadDS, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jComboBox_driver, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel72)
                            .addComponent(chk_kFoldDS)))
                    .addComponent(btn_reloadDS, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(text_rankedFeatures, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(text_rankedFeatureLabels, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel191)
                    .addComponent(text_rankedFeatureWeights, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tab_dsTables, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1)
                    .addComponent(tab_main, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tab_main, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tab_dsTables)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btn_loadDSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_loadDSActionPerformed
        clearAllLists();
        ds = Utils.loadDataSet("Select train set");
        if (ds == null) {
            return;
        }

        text_rankedFeatureLabels.setText(ds.featureLabels);
        text_rankedFeatures.setText(ds.featureIndexes);
        FeatureLabelString = ds.featureLabels;

        if (chk_kFoldDS.isSelected()) {
            if (ds.fileName.equals("train.txt")) {
                String path = ds.path;
                path = path.replace("train", "test");
                println("file:" + path);
                ds_test = Utils.readDataSet(path);
                vTest = Utils.cloneVector(ds_test.data);
                orgTest = Utils.cloneVector(vTest);
            }
        }

        orgData = Utils.cloneVector(ds.data);
        vAllDS = Utils.cloneVector(orgData);
        vAllTrain = Utils.cloneVector(orgData);
        vTrain = Utils.cloneVector(orgData);
        orgTrain = Utils.cloneVector(orgData);
        isDataNormalized = false;
        nFeatures = ds.nFeatures;
        nClasses = ds.nClasses;
        repaintTables();
    }//GEN-LAST:event_btn_loadDSActionPerformed

    private void println(String str) {
        System.out.println(str);
    }

    private void println(JTextArea obj, String msg) {
        obj.append(msg + "\n");
    }

    private void btn_generateDSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_generateDSActionPerformed
        generateSyntheticDataSet();
    }//GEN-LAST:event_btn_generateDSActionPerformed

    private void btn_saveDSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_saveDSActionPerformed
        saveDataSet();
    }//GEN-LAST:event_btn_saveDSActionPerformed

    private void btn_plotDSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_plotDSActionPerformed
        Utils.plotMatrix(vTrain);
    }//GEN-LAST:event_btn_plotDSActionPerformed

    private void btn_normalizeDataSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_normalizeDataSetActionPerformed
        if (!isDataNormalized) {
            normalizeDataSet();
        }
    }//GEN-LAST:event_btn_normalizeDataSetActionPerformed

    private void btn_annActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_annActionPerformed
        if (vTrain == null || vTrain.isEmpty()) {
            Utils.showMessage("Load Dataset first then try again");
            return;
        }
        if (!isDataNormalized) {
            normalizeDataSet();
        }
        if (modelANN == null) {
            modelANN = new FrameANN(this);
            modelANN.setVisible(true);
        }
    }//GEN-LAST:event_btn_annActionPerformed

    private void text_rankedFeaturesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_rankedFeaturesKeyTyped
        rankedFeaturesKeyTyped();
    }//GEN-LAST:event_text_rankedFeaturesKeyTyped

    protected void rankedFeaturesKeyTyped() {
        String str = Utils.getRankedFeatureLabels(FeatureLabelString, text_rankedFeatures.getText());
        text_rankedFeatureLabels.setText(str);
        nFeatures = text_rankedFeatures.getText().split(";").length;
    }

    private void btn_ldaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_ldaActionPerformed
        if (vTrain == null || vTrain.isEmpty()) {
            Utils.showMessage("Load Dataset first then try again");
            return;
        }
        btn_normalizeDataSet.doClick();
    }//GEN-LAST:event_btn_ldaActionPerformed

    private void btn_svmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_svmActionPerformed
        if (vTrain == null || vTrain.isEmpty()) {
            Utils.showMessage("Load Dataset first then try again");
            return;
        }
        btn_normalizeDataSet.doClick();
    }//GEN-LAST:event_btn_svmActionPerformed

    private void btn_reloadDSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_reloadDSActionPerformed
        reloadDataSet();
    }//GEN-LAST:event_btn_reloadDSActionPerformed

    private void chk_useANNİtemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chk_useANNİtemStateChanged
        if (chk_useANN.isSelected()) {
            chk_useLDA.setSelected(false);
            chk_useSVM.setSelected(false);
        }
    }//GEN-LAST:event_chk_useANNİtemStateChanged

    private void chk_useLDAİtemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chk_useLDAİtemStateChanged
        if (chk_useLDA.isSelected()) {
            chk_useANN.setSelected(false);
            chk_useSVM.setSelected(false);
        }
    }//GEN-LAST:event_chk_useLDAİtemStateChanged

    private void chk_useSVMİtemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chk_useSVMİtemStateChanged
        if (chk_useSVM.isSelected()) {
            chk_useANN.setSelected(false);
            chk_useLDA.setSelected(false);
        }
    }//GEN-LAST:event_chk_useSVMİtemStateChanged

    private void radio_filterİtemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_radio_filterİtemStateChanged
        combo_featureSelectionMethod.setEnabled(true);
        combo_featureSelectionMethod.removeAllItems();
        combo_featureSelectionMethod.addItem("Fisher Discrimination Power");
    }//GEN-LAST:event_radio_filterİtemStateChanged

    private void radio_unTypedİtemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_radio_unTypedİtemStateChanged
        combo_featureSelectionMethod.removeAllItems();
        combo_featureSelectionMethod.setEnabled(false);
    }//GEN-LAST:event_radio_unTypedİtemStateChanged

    private void radio_wrapperİtemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_radio_wrapperİtemStateChanged
        combo_featureSelectionMethod.setEnabled(true);
        combo_featureSelectionMethod.removeAllItems();
        combo_featureSelectionMethod.addItem("Exhaustive (NP Hard, Brute Force)");
        combo_featureSelectionMethod.addItem("Simulated Annealing");
        combo_featureSelectionMethod.addItem("HBBE (Hierarchical Bottleneck Backward Elimination)");
        combo_featureSelectionMethod.addItem("MRMR (Minimum Redundancy Maximum Relavance)");
        combo_featureSelectionMethod.addItem("RFE (Guyon's Recursive Feature Elimination)");
        combo_featureSelectionMethod.addItem("Greedy Forward Selection");
        combo_featureSelectionMethod.addItem("Greedy Backward Elimination");
        combo_featureSelectionMethod.addItem("Greedy Hybrid");
        combo_featureSelectionMethod.addItem("CFF (Complementary Feature Family)");
    }//GEN-LAST:event_radio_wrapperİtemStateChanged

    private void btn_kFoldCVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_kFoldCVActionPerformed
        if (FeatureLabelString.isEmpty()) {
            Utils.showMessage("You should load data set first and try again");
            return;
        }
        if (chk_kFoldFromFile.isSelected()) {
            Utils.splitKFoldCV(FeatureLabelString, vTrain, nRpt);
        } else {
            Utils.splitKFoldCV(FeatureLabelString, vTrain, nRpt, Integer.parseInt(txt_kFold.getText()));
        }
    }//GEN-LAST:event_btn_kFoldCVActionPerformed

    private void chk_kFoldFromFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chk_kFoldFromFileActionPerformed
        if (chk_kFoldFromFile.isSelected()) {
            jLabel92.setVisible(false);
            txt_kFold.setVisible(false);
        } else {
            jLabel92.setVisible(true);
            txt_kFold.setVisible(true);
        }
    }//GEN-LAST:event_chk_kFoldFromFileActionPerformed

    private void btn_generateKFoldTemplateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_generateKFoldTemplateActionPerformed
        Utils.repairTestFiles();
    }//GEN-LAST:event_btn_generateKFoldTemplateActionPerformed

    private void btn_evaluateMLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_evaluateMLActionPerformed
        SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
            public Void doInBackground() {
                return evaluateML();
            }
        };
        worker.execute();
        //evaluateML();
    }//GEN-LAST:event_btn_evaluateMLActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(AppMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(AppMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(AppMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AppMainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new AppMainFrame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btn_ann;
    private javax.swing.JButton btn_evaluateML;
    private javax.swing.JButton btn_generateDS;
    private javax.swing.JButton btn_generateKFoldTemplate;
    private javax.swing.JButton btn_kFoldCV;
    private javax.swing.JButton btn_lda;
    private javax.swing.JButton btn_loadDS;
    private javax.swing.JButton btn_normalizeDataSet;
    private javax.swing.JButton btn_plotDS;
    private javax.swing.JButton btn_reloadDS;
    private javax.swing.JButton btn_saveDS;
    private javax.swing.JButton btn_svm;
    private javax.swing.ButtonGroup buttonGroup1;
    public javax.swing.JCheckBox chk_kFoldDS;
    private javax.swing.JCheckBox chk_kFoldFromFile;
    private javax.swing.JCheckBox chk_useANN;
    private javax.swing.JCheckBox chk_useLDA;
    private javax.swing.JCheckBox chk_useSVM;
    private javax.swing.JComboBox combo_CV;
    private javax.swing.JComboBox combo_featureSelectionMethod;
    private javax.swing.JComboBox combo_normalizationTechnique;
    private javax.swing.JComboBox combo_randomizationTechnque;
    public javax.swing.JComboBox jComboBox_driver;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel191;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JLabel lbl_testColumn;
    private javax.swing.JLabel lbl_testRow;
    private javax.swing.JLabel lbl_trainColumn;
    private javax.swing.JLabel lbl_trainRow;
    private javax.swing.JLabel lbl_validationColumn;
    private javax.swing.JLabel lbl_validationRow;
    private javax.swing.JTextArea log;
    private javax.swing.JPanel pan_dataSet;
    private javax.swing.JPanel pan_evaluation;
    private javax.swing.JPanel pan_featureSelection;
    private javax.swing.JPanel pan_modelSelection;
    private javax.swing.JPanel pan_preProcessing;
    private javax.swing.JPanel pan_testDS;
    private javax.swing.JPanel pan_trainDS;
    private javax.swing.JPanel pan_validationDS;
    private javax.swing.JPanel pan_visualization;
    private javax.swing.JRadioButton radio_filter;
    private javax.swing.JRadioButton radio_unTyped;
    private javax.swing.JRadioButton radio_wrapper;
    private javax.swing.JTabbedPane tab_dsTables;
    private javax.swing.JTabbedPane tab_main;
    private javax.swing.JTable table_testDS;
    private javax.swing.JTable table_trainDS;
    private javax.swing.JTable table_validationDS;
    private javax.swing.JTextField text_numberOfArtificialFeatures;
    private javax.swing.JTextField text_numberOfArtificialRows;
    public javax.swing.JTextField text_rankedFeatureLabels;
    public javax.swing.JTextField text_rankedFeatureWeights;
    public javax.swing.JTextField text_rankedFeatures;
    private javax.swing.JTextField text_separatorChar;
    private javax.swing.JTextField txt_kFold;
    // End of variables declaration//GEN-END:variables

    private void repaintTables() {
        updateTableLabels();

        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                // Here, we can safely update the GUI
                // because it will be called from the
                // event dispatch thread
                if (Utils.getTableModel(vTrain, text_rankedFeatureLabels.getText()) != null) {
                    table_trainDS.setModel(Utils.getTableModel(vTrain, text_rankedFeatureLabels.getText()));
                } else {
                    Utils.clearTable(table_trainDS);
                }
                if (Utils.getTableModel(vValidation, text_rankedFeatureLabels.getText()) != null) {
                    table_validationDS.setModel(Utils.getTableModel(vValidation, text_rankedFeatureLabels.getText()));
                } else {
                    Utils.clearTable(table_validationDS);
                }
                if (Utils.getTableModel(vTest, text_rankedFeatureLabels.getText()) != null) {
                    table_testDS.setModel(Utils.getTableModel(vTest, text_rankedFeatureLabels.getText()));
                } else {
                    Utils.clearTable(table_testDS);
                }

            }
        });
    }

    private void updateTableLabels() {
        if (vTrain != null && !vTrain.isEmpty()) {
            lbl_trainRow.setText("Row:" + vTrain.size());
            lbl_trainColumn.setText("Column:" + vTrain.firstElement().split(text_separatorChar.getText()).length);
        }

        if (vValidation != null && !vValidation.isEmpty()) {
            lbl_validationRow.setText("Row:" + vValidation.size());
            lbl_validationColumn.setText("Column:" + vValidation.firstElement().split(text_separatorChar.getText()).length);

        }

        if (vTest != null && !vTest.isEmpty()) {
            lbl_testRow.setText("Row:" + vTest.size());
            lbl_testColumn.setText("Column:" + vTest.firstElement().split(text_separatorChar.getText()).length);
        }
    }

    private void generateSyntheticDataSet() {
        int nCols = Integer.parseInt(text_numberOfArtificialFeatures.getText());
        int nRows = Integer.parseInt(text_numberOfArtificialRows.getText());
        String type = (combo_randomizationTechnque.getSelectedIndex() == 0) ? "uniform" : "gaussian";
        vTrain = Utils.getArtificialDataSet(nCols, nRows, type);
        table_trainDS.setModel(Utils.getTableModel(vTrain, Utils.getVectorAsString(1, nCols)));

        lbl_trainRow.setText("Row:" + vTrain.size());
        lbl_trainColumn.setText("Column:" + vTrain.firstElement().split(text_separatorChar.getText()).length);
    }

    private void saveDataSet() {
        Utils.saveDataSet(vTrain);
    }

    private void normalizeDataSet() {
        if (vTrain.size() != 0) {
            if (vTrain.size()>1) vTrain = Utils.normalizeData(vTrain, combo_normalizationTechnique.getSelectedItem().toString());
            if (vValidation.size()>1) vValidation = Utils.normalizeData(vValidation, combo_normalizationTechnique.getSelectedItem().toString());
            if (vTest.size()>1) vTest = Utils.normalizeData(vTest, combo_normalizationTechnique.getSelectedItem().toString());
            normalizedTrain = Utils.cloneVector(vTrain);
            normalizedValidation = Utils.cloneVector(vValidation);
            normalizedTest = Utils.cloneVector(vTest);
            isDataNormalized = true;
            repaintTables();
        }
    }

    private void clearAllLists() {
        if (orgData != null) {
            orgData.removeAllElements();
        }
        if (vAllDS != null) {
            vAllDS.removeAllElements();
        }
        if (vAllTrain != null) {
            vAllTrain.removeAllElements();
        }
        if (vTrain != null) {
            vTrain.removeAllElements();
        }
        if (vValidation != null) {
            vValidation.removeAllElements();
        }
        if (vTest != null) {
            vTest.removeAllElements();
        }
        if (orgTrain != null) {
            orgTrain.removeAllElements();
        }
        if (orgValidation != null) {
            orgValidation.removeAllElements();
        }
        if (orgTest != null) {
            orgTest.removeAllElements();
        }
        if (normalizedTrain != null) {
            normalizedTrain.removeAllElements();
        }
        if (normalizedValidation != null) {
            normalizedValidation.removeAllElements();
        }
        if (normalizedTest != null) {
            normalizedTest.removeAllElements();
        }
    }

    private void reloadDataSet() {
        if (text_rankedFeatures.getText().isEmpty()) {
            text_rankedFeatures.setText(ds.featureIndexes);
            text_rankedFeatureLabels.setText(ds.featureLabels);
            nFeatures = ds.nFeatures;
        }
        isDataNormalized = false;
        if (orgTrain != null && orgTrain.size() != 0) {
            vTrain = Utils.cloneVector(orgTrain);
        }
        if (orgTest != null && orgTest.size() != 0) {
            vTest = Utils.cloneVector(orgTest);
        }
        if (vTrain != null && vTrain.size() != 0) {
            vTrain = Utils.getMatrixByFeatureIndexes(vTrain, text_rankedFeatures.getText());
        }
        if (vTest != null && vTest.size() != 0) {
            vTest = Utils.getMatrixByFeatureIndexes(vTest, text_rankedFeatures.getText());
        }
        repaintTables();
    }

    private Void evaluateML() {
        double accuracy_rate=0;
        double error_rate=0;
        if (!isDataNormalized) {
            normalizeDataSet();
        }
        if (chk_useANN.isSelected()) {
            if (modelANN == null) {
                modelANN = new FrameANN(this);
            }
            modelANN.setVisible(true);
            if (radio_unTyped.isSelected()) {
                //Leave-One-Out Cross Validation yapilacaksa
                if (combo_CV.getSelectedIndex() == 0) {
                    double tError=0;
                    int n=orgTrain.size();
                    Vector<String> tempNormalized = Utils.normalizeData(vTrain,"zscore");
                    for (int i=0;i<n;i++) {
                        vTrain = Utils.cloneVector(orgTrain);
                        vTrain.removeElement(orgTrain.get(i));
                        vValidation.removeAllElements();
                        vValidation.add(tempNormalized.get(i));
                        if (!chk_kFoldDS.isSelected()) {
                            normalizeDataSet();
                        } else {
                            Utils.showMessage("For Leave One Out CV Evaluation please uncheck KFOLD Data Set checkbox and try again");
                        }
                        repaintTables();
                        modelANN.setFrame(this);
                        if (modelANN.jButton_ANNtrain.isEnabled()) {
                            modelANN.jButton_ANNtrain.doClick();
                            while (!modelANN.jButton_ANNtest.isEnabled()) {
                            }
                            modelANN.doTestANN();
                        }
                        double err = modelANN.NNX.toplam_err;
                        tError+=err;
                        accuracy_rate=(1-Utils.formatDouble(tError/orgTrain.size()));
                        modelANN.setTitle("Leave One Out Cross Validation Fold:"+(i+1)+" number of error:"+tError+" accuracy rate:"+accuracy_rate);
                   }
                }
            }
        }
        return null;
    }
}
